@echo off
SET "CPP_FILE_PREFIX=HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio"
SET "CPP_FILE_POSTFIX=Languages\File Extensions"
SET "PATH_VAX=HKCU\Software\Whole Tomato\Visual Assist X\VANet"

reg query "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.hlsl" /f
reg query "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.fx" /f
reg query "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\8.0\%CPP_FILE_POSTFIX%\.cfx" /f
reg query "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.hlsl" /f
reg query "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.fx" /f
reg query "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" && reg copy "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cpp" "%CPP_FILE_PREFIX%\9.0\%CPP_FILE_POSTFIX%\.cfx" /f

reg query "%PATH_VAX%8" /v ExtSource && reg add "%PATH_VAX%8" /v ExtSource /d .c;.cpp;.cc;.cxx;.tli;.hlsl;.fx;.cfx; /f
reg query "%PATH_VAX%9" /v ExtSource && reg add "%PATH_VAX%9" /v ExtSource /d .c;.cpp;.cc;.cxx;.tli;.hlsl;.fx;.cfx; /f
pause
